<?php
/**
* 用户信息存储类
*/
namespace common\user;

use yii\db\ActiveRecord;
use yii\web\IdentityInterface;

class User extends ActiveRecord implements IdentityInterface
{

	public static function tableName()
	{
		return '{{%user}}';
	}

	public function rules()
	{
		return [

		];
	}

	public function login($username, $passwd)
	{
		$this->id = 1;
		return $this;
	}

	public static function findIdentity($id)
	{
		return new static(['id' => $id]);
	}
	

	public static function findIdentityByAccessToken($token, $type = NULL)
	{
		return false;
	}


	public function getId()
	{
		return $this->id;
	}

	public function getAuthKey()
	{
		return false;
	}

	public function validateAuthKey($authKey)
	{
		return false;
	}

}